<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../js/css/layui.css">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<div class="layui-tab">
    <ul class="layui-tab-title">
        <li class="layui-this">基本信息</li>
        <li>选项设置</li>
    </ul>
    <div class="layui-tab-content">

        <div class="layui-tab-item layui-show">
            <form class="layui-form" action="">
                <div class="amin-content">
                    <div class="layui-row layui-col-space15">

                        <div class="layui-col-md9">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">标题</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="title" lay-verify="required|title" autocomplete="off" placeholder="请输入 标题" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">副标题</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="title" lay-verify="required|title" autocomplete="off" placeholder="请输入副标题" class="layui-input">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">SEO关键字</label>
                                <div class="layui-input-inline">
                                    <input type="password" name="password" lay-verify="pass" placeholder="请输入关键字" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">（多个请用,隔开）</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">SEO描述</label>
                                <div class="layui-input-block">
                                    <textarea  class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">SEO简介</label>
                                <div class="layui-input-block">
                                    <textarea  class="layui-textarea"></textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">内容</label>
                                <div class="layui-input-block">
                                    <textarea id="demo" class="layui-textarea"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md3">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">属性</label>
                                    <div class="layui-input-block">
                                        <input type="checkbox" name="attr[write]" title="粗体" lay-skin="primary">
                                        <input type="checkbox" name="attr[read]" title="斜体" lay-skin="primary">
                                        <input type="checkbox" name="attr[game]" title="删除线" lay-skin="primary">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">颜色</label>
                                    <div class="layui-input-inline">
                                        <div class="layui-input-inline" style="width: 120px;">
                                            <input type="text" value="" placeholder="请选择颜色" class="layui-input" id="test-form-input">
                                        </div>
                                        <div class="layui-inline" style="left: -11px;">
                                            <div id="test-form"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">发布时间</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="date" id="date" placeholder="发布时间" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">作者</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="发布时间" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">来源</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="发布时间" class="layui-input">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">是否审核</label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="sex" value="审核" title="审核" checked="">
                                        <input type="radio" name="sex" value="待审核" title="待审核">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">外部链接</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="title" lay-verify="required|title" autocomplete="off" placeholder="外部链接" class="layui-input">
                                    </div>
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">推荐</label>
                                    <div class="layui-input-inline">
                                        <select name="interest" lay-filter="aihao">
                                            <option value=""></option>
                                            <option value="0">推荐</option>
                                            <option value="0">不推荐</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">头条</label>
                                    <div class="layui-input-inline">
                                        <select name="interest" lay-filter="aihao">
                                            <option value=""></option>
                                            <option value="0">头条一</option>
                                            <option value="0">头条二</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">图片</label>
                                <div class="layui-inline">
                                    <div class="layui-upload-drag" id="test10">
                                        <i class="layui-icon"></i>
                                        <p>点击上传，或将文件拖拽到此处</p>
                                    </div>

                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit="" lay-filter="demo1">立即00提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </form>
        </div>
        <div class="layui-tab-item">
            <div class="layui-form-item">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">是否11置顶</label>
                            <div class="layui-input-inline">
                                <select name="interest" lay-filter="aihao">
                                    <option value=""></option>
                                    <option value="0">推荐</option>
                                    <option value="0">不推荐</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                        <label class="layui-form-label">是否置顶</label>
                        <div class="layui-input-inline">
                            <div id="test3" class="demo-transfer"></div>
                            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                                <legend>显示搜索框</legend>
                            </fieldset>
                        </div>
                    </div>
                </form>
            </div>
        </div>

    </div>
</div>

<script src="../layui.all.js"></script>
<script>
    layui.use(['transfer', 'layer', 'util'],function () {
        var layedit = layui.layedit;
        var publish_time = layui.laydate;
        var $ = layui.$;
        var transfer = layui.transfer;
        var layer = layui.layer;
        var util = layui.util;
        var colorpicker  = layui.colorpicker;

        //模拟数据
        var data1 = [
            {"value": "1", "title": "李白"}
            ,{"value": "2", "title": "杜甫"}
            ,{"value": "3", "title": "苏轼"}
            ,{"value": "4", "title": "李清照"}
            ,{"value": "5", "title": "鲁迅", "disabled": true}
            ,{"value": "6", "title": "巴金"}
            ,{"value": "7", "title": "冰心"}
            ,{"value": "8", "title": "矛盾"}
            ,{"value": "9", "title": "贤心"}
        ];
        transfer.render({
            elem: '#test4'
            ,data: data1
            ,title: ['文本墨客', '获奖文人']
            ,showSearch: true
        });


        var upload =layui.upload;
        upload.render({
            elem: '#test10'
            ,url: '../images/'
            ,done: function(res){
                console.log(res)
            }
        });
        colorpicker.render({
            elem: '#test-form' //绑定元素
            ,color:'#1c97f5'
            ,done: function(color){ //颜色改变的回调
                $("#test-form-input").val(color);
            }
        });
        publish_time.render({
            elem: "#date"
            ,type: 'datetime'
        });
        layedit.build('demo');
    });




</script>

</body>
</html>